﻿namespace KinonekoSoftware.Foundation.UI.Controls.Containers
{
#if WINDOWS
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Media;
    
    /// <summary>
    /// 
    /// </summary>
	public partial class SectionBase
	{

        public static readonly DependencyProperty EnableQAProperty;

        static SectionBase()
        {
            
            DefaultStyleKeyProperty.OverrideMetadata(typeof(SectionBase), new FrameworkPropertyMetadata(typeof(SectionBase)));
            EnableQAProperty = DependencyProperty.Register(nameof(EnableQA), typeof(bool), typeof(SectionBase), new PropertyMetadata(default(bool)));
        }

        #region Title

        public static readonly DependencyProperty TitleProperty                 = DependencyProperty.Register(nameof(Title), typeof(object), typeof(SectionBase), new PropertyMetadata(default(object)));
        public static readonly DependencyProperty TitleTemplateProperty         = DependencyProperty.Register(nameof(TitleTemplate), typeof(DataTemplate), typeof(SectionBase), new PropertyMetadata(default(DataTemplate)));
        public static readonly DependencyProperty TitleTemplateSelectorProperty = DependencyProperty.Register(nameof(TitleTemplateSelector), typeof(DataTemplateSelector), typeof(SectionBase), new PropertyMetadata(default(DataTemplateSelector)));
        public static readonly DependencyProperty TitleStringFormatProperty     = DependencyProperty.Register(nameof(TitleStringFormat), typeof(string), typeof(SectionBase), new PropertyMetadata(default(string)));
        public static readonly DependencyProperty TitleBrushProperty            = DependencyProperty.Register(nameof(TitleBrush), typeof(Brush), typeof(SectionBase), new PropertyMetadata(default(Brush)));
        public static readonly DependencyProperty TitlePaddingProperty          = DependencyProperty.Register(nameof(TitlePadding), typeof(Thickness), typeof(SectionBase), new PropertyMetadata(default(Thickness)));
        public static readonly DependencyProperty TitleFontSizeProperty         = DependencyProperty.Register(nameof(TitleFontSize), typeof(int), typeof(SectionBase), new PropertyMetadata(default(int)));
        public static readonly DependencyProperty TitleFontFamilyProperty       = DependencyProperty.Register(nameof(TitleFontFamily), typeof(FontFamily), typeof(SectionBase), new PropertyMetadata(default(FontFamily)));


        public FontFamily TitleFontFamily
        {
            get => (FontFamily)GetValue(TitleFontFamilyProperty);
            set => SetValue(TitleFontFamilyProperty, value);
        }

        public int TitleFontSize
        {
            get => (int)GetValue(TitleFontSizeProperty);
            set => SetValue(TitleFontSizeProperty, value);
        }

        public Thickness TitlePadding
        {
            get => (Thickness)GetValue(TitlePaddingProperty);
            set => SetValue(TitlePaddingProperty, value);
        }

        public Brush TitleBrush
        {
            get => (Brush)GetValue(TitleBrushProperty);
            set => SetValue(TitleBrushProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="TitleStringFormat"/> 属性。
        /// </summary>
        public string TitleStringFormat
        {
            get => (string)GetValue(TitleStringFormatProperty);
            set => SetValue(TitleStringFormatProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="TitleTemplateSelector"/> 属性。
        /// </summary>
        public DataTemplateSelector TitleTemplateSelector
        {
            get => (DataTemplateSelector)GetValue(TitleTemplateSelectorProperty);
            set => SetValue(TitleTemplateSelectorProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="TitleTemplate"/> 属性。
        /// </summary>
        public DataTemplate TitleTemplate
        {
            get => (DataTemplate)GetValue(TitleTemplateProperty);
            set => SetValue(TitleTemplateProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="Title"/> 属性。
        /// </summary>
        public object Title
        {
            get => GetValue(TitleProperty);
            set => SetValue(TitleProperty, value);
        }

        #endregion

        #region SubTitle

        public static readonly DependencyProperty SubTitleProperty                 = DependencyProperty.Register(nameof(SubTitle), typeof(object), typeof(SectionBase), new PropertyMetadata(default(object)));
        public static readonly DependencyProperty SubTitleTemplateProperty         = DependencyProperty.Register(nameof(SubTitleTemplate), typeof(DataTemplate), typeof(SectionBase), new PropertyMetadata(default(DataTemplate)));
        public static readonly DependencyProperty SubTitleTemplateSelectorProperty = DependencyProperty.Register(nameof(SubTitleTemplateSelector), typeof(DataTemplateSelector), typeof(SectionBase), new PropertyMetadata(default(DataTemplateSelector)));
        public static readonly DependencyProperty SubTitleStringFormatProperty     = DependencyProperty.Register(nameof(SubTitleStringFormat), typeof(string), typeof(SectionBase), new PropertyMetadata(default(string)));
        public static readonly DependencyProperty SubTitleBrushProperty            = DependencyProperty.Register(nameof(SubTitleBrush), typeof(Brush), typeof(SectionBase), new PropertyMetadata(default(Brush)));
        public static readonly DependencyProperty SubTitlePaddingProperty          = DependencyProperty.Register(nameof(SubTitlePadding), typeof(Thickness), typeof(SectionBase), new PropertyMetadata(default(Thickness)));
        public static readonly DependencyProperty SubTitleFontSizeProperty         = DependencyProperty.Register(nameof(SubTitleFontSize), typeof(int), typeof(SectionBase), new PropertyMetadata(default(int)));
        public static readonly DependencyProperty SubTitleFontFamilyProperty       = DependencyProperty.Register(nameof(SubTitleFontFamily), typeof(FontFamily), typeof(SectionBase), new PropertyMetadata(default(FontFamily)));


        public FontFamily SubTitleFontFamily
        {
            get => (FontFamily)GetValue(SubTitleFontFamilyProperty);
            set => SetValue(SubTitleFontFamilyProperty, value);
        }

        public int SubTitleFontSize
        {
            get => (int)GetValue(SubTitleFontSizeProperty);
            set => SetValue(SubTitleFontSizeProperty, value);
        }

        public Thickness SubTitlePadding
        {
            get => (Thickness)GetValue(SubTitlePaddingProperty);
            set => SetValue(SubTitlePaddingProperty, value);
        }

        public Brush SubTitleBrush
        {
            get => (Brush)GetValue(SubTitleBrushProperty);
            set => SetValue(SubTitleBrushProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="SubTitleStringFormat"/> 属性。
        /// </summary>
        public string SubTitleStringFormat
        {
            get => (string)GetValue(SubTitleStringFormatProperty);
            set => SetValue(SubTitleStringFormatProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="SubTitleTemplateSelector"/> 属性。
        /// </summary>
        public DataTemplateSelector SubTitleTemplateSelector
        {
            get => (DataTemplateSelector)GetValue(SubTitleTemplateSelectorProperty);
            set => SetValue(SubTitleTemplateSelectorProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="SubTitleTemplate"/> 属性。
        /// </summary>
        public DataTemplate SubTitleTemplate
        {
            get => (DataTemplate)GetValue(SubTitleTemplateProperty);
            set => SetValue(SubTitleTemplateProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="SubTitle"/> 属性。
        /// </summary>
        public object SubTitle
        {
            get => GetValue(SubTitleProperty);
            set => SetValue(SubTitleProperty, value);
        }

        #endregion

        #region ToolBar



        /// <summary>
        /// 实现 <see cref="ToolBar"/> 属性的依赖属性。
        /// </summary>
        public static readonly DependencyProperty ToolBarProperty = DependencyProperty.Register(
            nameof(ToolBar),
            typeof(object),
            typeof(SectionBase),
            new PropertyMetadata(default(object)));

        /// <summary>
        /// 实现 <see cref="ToolBarTemplate"/> 属性的依赖属性。
        /// </summary>
        public static readonly DependencyProperty ToolBarTemplateProperty = DependencyProperty.Register(
            nameof(ToolBarTemplate),
            typeof(DataTemplate),
            typeof(SectionBase),
            new PropertyMetadata(default(DataTemplate)));

        /// <summary>
        /// 实现 <see cref="ToolBarTemplateSelector"/> 属性的依赖属性。
        /// </summary>
        public static readonly DependencyProperty ToolBarTemplateSelectorProperty = DependencyProperty.Register(
            nameof(ToolBarTemplateSelector),
            typeof(DataTemplateSelector),
            typeof(SectionBase),
            new PropertyMetadata(default(DataTemplateSelector)));

        /// <summary>
        /// 实现 <see cref="ToolBarStringFormat"/> 属性的依赖属性。
        /// </summary>
        public static readonly DependencyProperty ToolBarStringFormatProperty = DependencyProperty.Register(
            nameof(ToolBarStringFormat),
            typeof(string),
            typeof(SectionBase),
            new PropertyMetadata(default(string)));

        /// <summary>
        /// 获取或设置 <see cref="ToolBarStringFormat"/> 属性。
        /// </summary>
        public string ToolBarStringFormat
        {
            get => (string)GetValue(ToolBarStringFormatProperty);
            set => SetValue(ToolBarStringFormatProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="ToolBarTemplateSelector"/> 属性。
        /// </summary>
        public DataTemplateSelector ToolBarTemplateSelector
        {
            get => (DataTemplateSelector)GetValue(ToolBarTemplateSelectorProperty);
            set => SetValue(ToolBarTemplateSelectorProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="ToolBarTemplate"/> 属性。
        /// </summary>
        public DataTemplate ToolBarTemplate
        {
            get => (DataTemplate)GetValue(ToolBarTemplateProperty);
            set => SetValue(ToolBarTemplateProperty, value);
        }

        /// <summary>
        /// 获取或设置 <see cref="ToolBar"/> 属性。
        /// </summary>
        public object ToolBar
        {
            get => GetValue(ToolBarProperty);
            set => SetValue(ToolBarProperty, value);
        }   

        #endregion

        public bool EnableQA
        {
            get => (bool)GetValue(EnableQAProperty);
            set => SetValue(EnableQAProperty, Boxing.Box(value));
        }
	}
#endif
}